﻿using System;

namespace Phoenix.Xna.Framework.Serialization.Markup.Objects
{
    /// <summary>
    /// Defines the intermediary markup object for all types.
    /// </summary>
    internal interface IMarkupObject : IMarkupElement
    {
        /// <summary>
        /// Gets the object that is defined by this instance.
        /// </summary>
        object Instance { get; }

        /// <summary>
        /// Gets or sets the System.Type of the defined object.
        /// </summary>
        Type ObjectType { get; set; }

        /// <summary>
        /// Convert this MarkupObject in to an object model and sets the Instance.
        /// </summary>
        void ConstructInstance();

        /// <summary>
        /// Extract the markup information from the specified object.
        /// </summary>
        /// <param name="instance">The instance to extract markup information for.</param>
        void ExtractMarkup(object instance);
    }
}
